package cn.com.oceansoft.osc.ms.service.impl;

import cn.com.oceansoft.osc.ms.domain.ZxxxConfig;
import cn.com.oceansoft.osc.ms.domain.ZxxxInfo;
import cn.com.oceansoft.osc.ms.persistence.IZxxxRepository;
import cn.com.oceansoft.osc.ms.service.IZxxxService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
import java.util.UUID;

@Service
@Transactional
public class ZxxxServiceImpl implements IZxxxService {

    @Resource
    private IZxxxRepository zxxxRepository;

    @Override
    public List<ZxxxInfo> selectZInfo() throws Exception{
       return zxxxRepository.selectZInfo();
    }

    @Override
    public List<ZxxxInfo> selectZInfotemp(String guid) throws Exception{
        return zxxxRepository.selectZInfotemp(guid);
    }

    @Override
    public List<ZxxxInfo> selectZInfowst(String wst) throws Exception{
        return zxxxRepository.selectZInfowst(wst);
    }

    @Override
    public List<ZxxxInfo> selectZInfowsttemp(String wst,String temp1) throws Exception{
        return zxxxRepository.selectZInfowsttemp(wst,temp1);
    }

    @Override
    public ZxxxInfo selectZInfoguid(String guid) throws Exception{
        return zxxxRepository.selectZInfoguid(guid);
    }

    @Override
    public int insertZInfo(ZxxxInfo zxxxInfo) throws Exception{
        //zxxxInfo.setGuid(UUID.randomUUID().toString().replaceAll("-", ""));
        return zxxxRepository.insertZInfo(zxxxInfo);
    }

    @Override
    public int updateZInfo(ZxxxInfo zxxxInfo) throws Exception{
        return zxxxRepository.updateZInfo(zxxxInfo);
    }

    @Override
    public int deleteZInfo(String guid) throws Exception{
        return zxxxRepository.deleteZInfo(guid);
    }

    @Override
    public ZxxxConfig selectZConfig(String type,String infoguid) throws Exception{
        return zxxxRepository.selectZConfig(type,infoguid);
    }

    @Override
    public int insertZConfig(ZxxxConfig zxxxConfig) throws Exception{
        //zxxxConfig.setGuid(UUID.randomUUID().toString().replaceAll("-", ""));
        return zxxxRepository.insertZConfig(zxxxConfig);
    }

    @Override
    public int updateZConfig(ZxxxConfig zxxxConfig) throws Exception{
        return zxxxRepository.updateZConfig(zxxxConfig);
    }

    @Override
    public int deleteZConfig(String guid) throws Exception{
        return zxxxRepository.deleteZConfig(guid);
    }

    @Override
    public int deleteZConfiginfo(String guid) throws Exception{
        return zxxxRepository.deleteZConfiginfo(guid);
    }
}
